package com.jay.lang.clazz;

import java.lang.annotation.Annotation;

public class PackageCls {
	public static void main(String[] args) {

		for (Package p : Package.getPackages()) {
			System.out.println(p.getName());
		}
		System.out.println("-------------------");
		Package myP = Package.getPackage("sun.net.util");
		System.out.println(myP.getName());
		System.out.println(myP.getImplementationTitle());
		System.out.println(myP.getImplementationVendor());
		System.out.println(myP.getImplementationVersion());
		System.out.println(myP.getSpecificationTitle());
		System.out.println(myP.getSpecificationVendor());
		System.out.println(myP.getSpecificationVersion());
		System.out.println(myP.isSealed());
		System.out.println(myP.isCompatibleWith("1.9.1"));
		

		System.out.println("-------------------");
		Package myP1 = Package.getPackage("java.lang");
		System.out.println(myP1.getName());
		System.out.println(myP1.isSealed());

		for (Annotation a : myP1.getAnnotations()) {
			System.out.println(a);
		}
	}
}
